Skip to main content

Latest Document Changes


title: TNT API Changes Log description: Changes log for TNT API from v12 to v25.2

TNT API Changes Log

Changes log from v12 to v18

2.1.2. /product_categories

  • Fields status and message were deleted from the response.

2.1.3. /product_groups/

  • Fields status and message were deleted from the response.

2.1.4. /departments/

  • Fields status and message were deleted from the response.

2.1.5. /save_departments/

  • Request parameter is_production was deleted.
  • Request parameter object_type was added.
  • Field code was added to the response.
  • Error code 146 was added.

2.1.6. /del_departments/

  • Field code was added to the response.

2.1.7. /product_lines/

  • Fields status and message were deleted from the response.

2.1.8. /save_product_lines/

  • Field code was added to the response.

2.1.9. /del_product_lines/

  • Field code was added to the response.

2.1.10. /defect_types/

  • Fields status and message were deleted from the response.
  • Error codes were deleted.

2.1.11. /products/

  • Fields status and message were deleted from the response.
  • Error codes were deleted.

2.1.12. /save_products/

  • Field code was added to the response.
  • Error code 164 was added.
  • Error code 173 was deleted.

2.1.13. /del_products/

  • Field code was added to the response.

2.1.14. /check_order/

  • Error codes 0 and 116 were added.

2.1.15. /orders_list/

  • Added Case #2 using parameter num.
  • Parameter emission_type values were changed: 1 - retail, 2 - import.
  • Fields status, message, code, and ext_id were deleted from the response.
  • Field dat was replaced with order_date.

2.1.16. /make_batch/

  • Error codes 126, 127, 159, and 169 were added.

2.1.17. /gen_batch_codes/

  • Error codes 176 and 181 were added.

2.1.18. /get_batch_codes/

  • Request parameters offset and count were added to retrieve codes partially.
  • Error code 153 was deleted.
  • Error code 189 was added.

2.1.20. /make_aggregation/

  • Request parameter event_time was deleted.
  • Error codes 169 and 170 were added.

2.1.21-2.1.25. Production / packaging document endpoints

Affected endpoints:

  • 2.1.21. /make_production/
  • 2.1.22. /gen_product_codes/
  • 2.1.23. /get_product_codes/
  • 2.1.24. /close_production/
  • 2.1.25. /make_aggregation/ — same endpoint with different input parameters

Changes:

  • Added a block of endpoints to work with production / packaging documents.

2.1.26. /make_disaggregation/

  • Request parameter event_time was deleted.

2.1.27. /make_shipping/

  • Request parameter event_time was deleted.
  • Fields doc_id and doc_ext_id were added to the response.
  • Error code 146 was deleted.
  • Error code 189 was added.

2.1.28. /make_supply/

  • Request parameter event_time was deleted.
  • Fields doc_id and doc_ext_id were added to the response.
  • Error code 189 was added.

2.1.29. /make_utilization/

  • Fields doc_id and doc_ext_id were added to the response.
  • Error code 146 was deleted.
  • Error code 189 was added.

2.1.30. /get_totals/

  • Parameter assort_name type was changed to string.

2.1.31. /code_info/

  • Parameter emission_type values were changed: 1 - retail, 2 - import.
  • Parameter withdraw_type values:
    • 1 - sold
    • 2 - returned
    • 3 - utilized
    • 4 - disaggregated

Process description for endpoints 2.1.21-2.1.25

Example: bundles rework.

If packs of cigarettes were aggregated into bundles within batch production and the packs need to be reaggregated into new bundles, codes must be generated only for the bundles.

Process:

  1. Create a new production / packaging document using /make_production/.
    • Pass unit_id as the package ID for bundles.
    • Pass cnt as the number of new bundle codes needed for reaggregation.
  2. Confirm the document via the web interface:
    • Open the Production / Packaging tab.
    • Select the required record.
    • Click the burger button.
    • Click Confirm.
  3. Generate codes for bundles in this document using /gen_product_codes/.
  4. Obtain generated codes using /get_product_codes/.
  5. Reaggregate packs from old bundles to new ones using /make_aggregation/.
    • Pass doc_ext_id that was passed when creating the production / packaging document with /make_production/.
    • If doc_ext_id was not passed, use the document ID doc_id received in the response from /make_production/.
  6. After the process is finished, close the production document using /close_production/.
    • All unused bundle codes generated for this document will be deleted from the system.

Changes log from v18 to v19

1.2. Requirements

  • Added new request header: X-Land = en / az.

1.3. Endpoints

  • Endpoints /gen_batch_codes/, /get_batch_codes/, /gen_product_codes/, and /get_product_codes/ were marked with * as high-load endpoints.

2.1.1. /login_api/

  • Error code 102 was deleted.
  • Description for error code 103 was changed.

2.1.16. /make_batch/

  • Parameter id was added.
    • It is not mandatory.
    • It can be used to edit information about a production batch before production starts, before the first aggregation results are sent.
  • As category_id, it is possible to pass a category ID or a product group ID, but only group IDs inside this category.

2.1.18. /get_batch_codes/

  • Error code 102 was added.

2.1.20. /make_aggregation/

  • Description of aggregation schemes was changed.

2.1.21. /make_production/

  • Missing parameter product_line_ext_id / product_line_id was added.
  • Missing parameter doc_type was added.
  • Parameter doc_status was added:
    • 0 - New
    • 1 - Confirmed
  • The doc_status parameter allows avoiding mandatory document confirmation via the web interface before generating and obtaining generated codes.

2.1.23. /get_product_codes/

  • Error code 102 was added.

2.1.27. /make_shipping/

  • Description for parameter partner_fiscal_id was changed to clarify when it is mandatory.

2.1.28. /make_supply/

  • Description for parameter partner_fiscal_id was changed to clarify when it is mandatory.
  • The method was extended for the receiving goods process:
    • New array rejects was added for rejected codes when the mobile application is not used for scanning.
    • Objects in rejects include:
      • cnt - number of rejected codes
      • defect_type_id - rejection cause
    • Parameter defect_type_id was also added to each object in the codes array.

2.1.29. /make_utilization/

  • Parameter defect_id was changed to defect_type_id.

2.1.32. /validate_code/

  • New endpoint /validate_code/ was added.
  • It is similar to /code_info/, but also validates a code by department.
  • It can be used before shipping for validation.

General changes for selected document methods

For /make_production/, /make_shipping/, /make_supply/, and /make_utilization/:

  • Parameter num, which is a reference document number, is no longer mandatory.
  • A user reference can be passed if needed.
  • If not passed, it will be generated automatically by the system.

For /make_aggregation/, /make_shipping/, /make_supply/, and /make_utilization/:

  • Parameter cnt is no longer mandatory.
  • It now corresponds to the number of codes and is calculated by the system.

For all document parameters ending with _ext_id:

  • Type was changed to String(250).
  • Correct processing of integer type is preserved.

Additional documentation changes:

  • Descriptions of some methods and parameters were corrected for better understanding.
  • New references for input parameters were added.
  • Description of production schemes was added for:
    • Endpoints 2.1.16-2.1.20 — production / aggregation in the context of a production batch.
    • Endpoints 2.1.21-2.1.25 — production / aggregation in the context of a production document.

Changes log from v19 to v20

Signature

  • The list of requests requiring a signature was adjusted.
  • Adjusted list:
    • /get_batch_codes/
    • /get_product_codes/
    • /make_aggregation/
    • /make_disaggregation/
    • /make_shipping/
    • /make_supply/
    • /make_utilization/
  • New error codes 161 and 162 were added for these methods.

Rate limitation between high-load endpoints

  • The 2-second limitation was removed.

2.1.15. /orders_list/

  • New response parameters were added:
    • generated_cnt - quantity of codes that were generated, including activated and non-activated codes.
    • activated_cnt - quantity of codes that were generated and activated.
  • Based on generated_cnt, activated_cnt, and total quantity cnt, it is possible to calculate:
    • Quantity of codes available in the excise codes order: cnt - generated_cnt.
    • Quantity of codes generated but not activated: generated_cnt - activated_cnt.

2.1.16. /make_batch/

  • Error code 184 was added.

2.1.23. /get_product_codes/

  • Success response code 0 was deleted.

2.1.21. /make_production/

  • Request parameter doc_ext_id is no longer mandatory.

Code generation process status check

  • Added new endpoints to check whether the code generation process is completed or still ongoing:
    • 2.1.18. /check_batch_codes/
    • 2.1.24. /check_product_codes/
  • New response parameter doc_id was added for:
    • 2.1.17. /gen_batch_codes/
    • 2.1.23. /gen_product_codes/
  • The doc_id parameter is used as an input parameter for the new status check methods.

Changes log from v20.1 to v20.2

2.1.15. /orders_list/

  • Response parameter doc_status is now of type integer.
  • Possible values:
    • 0 - Draft
    • 1 - New
    • 2 - In Process
    • 3 - Verified
    • 4 - Confirmed
    • 5 - Rejected
    • 6 - Completed

Changes log from v20.2 to v20.3

2.1.16. /make_batch/

  • Optional parameter assort_id / assort_ext_id was added.

Changes log from v20.3 to v20.4

2.1.11. /products/

  • New parameters were added to the units array in the response:
    • barcode - package GTIN.
    • gen_code - true if codes are generated in the T&T system, false for external codes.
    • template_name - name of the code generation template.
    • label_name - name of the printed label.
  • New response parameter capacity was added - volume of product unit for alcohol.

2.1.12. /save_products/

  • New optional parameter barcode was added to the units array in the request - package GTIN.
  • New request parameter capacity was added - volume of product unit for alcohol.

Rate limitation

  • Rate limitation for endpoints /gen_batch_codes/, /get_batch_codes/, /gen_product_codes/, and /get_product_codes/ was set to once every 2 seconds.

Changes log from v20.4 to v20.5

2.1.15. /orders_list/

  • New response parameter reserved_cnt was added - quantity of codes reserved for production.

2.1.18. /check_batch_codes/

  • New response status not started was added.

2.1.24. /check_product_codes/

  • New response status not started was added.

Changes log from v20.5 to v20.6

2.1.15. /orders_list/

  • New parameter calc_totals was added.
  • It is a flag responsible for output of calculated fields:
    • generated_cnt
    • activated_cnt
    • reserved_cnt
  • Default value: false.

2.1.29. /make_shipping/

  • Request example with a transport pallet was added.

New error codes

  • 171 - Package with code %s already disaggregated.
  • 207 - Product with code %s already utilized.
  • 214 - Codes for excise order %s already used up.
  • 215 - Production line does not belong to this department.

Changes log from v20.6 to v21.1

New method /supplies/

  • Method to retrieve the list of expected supplies for external shipments.

New method /alive/

  • Method to check connection availability to the T&T system.

2.1.12. /save_products/

  • Parameter code is no longer mandatory.

2.1.29. /make_shipping/

  • New parameter doc_subtype was added for return documents.

New error codes

  • 154 - Product not found.
  • 216 - The capacity of the transferred code %s does not match the capacity of the product.
  • 217 - The category of the transferred code %s does not match the category of the product.
  • 218 - The %s code was transferred to another manufacturer.
  • 219 - The emission type of the %s code does not match the type of excise codes order.
  • 220 - Defect reason is not indicated.
  • 221 - The number of background requests exceeds the established limits.

Changes log from v21.1 to v21.2

New error codes

  • 222 - The code has already been shipped according to document % dated dd.mm.yyyy.
  • 223 - Too many errors in the request.
  • 224 - The item is not produced by your organization.

Batch life

  • Batch lifetime was increased from 20 days to 1 year.

Changes log from v21.2 to v21.3

2.1.29. /make_shipping/

  • Parameters assort_ext_id and unit_ext_id are no longer mandatory.

2.1.30. /make_supply/

  • Parameters assort_ext_id and unit_ext_id are no longer mandatory.

2.1.32. /make_utilization/

  • Parameters assort_ext_id and unit_ext_id are no longer mandatory.

Changes log from v21.3 to v21.4

2.1.29. /make_shipping/

  • Optional parameter confirmed was added to the units array in the request.
  • Applies only to internal transfers.
  • When set to true, receipt is automatically confirmed by the recipient and /make_supply/ is not required.
  • Default value: false.

Changes log from v21.4 to v21.5

2.1.21. /make_aggregation/

  • Optional parameter transport pallet was added to the items array in the request.
  • It allows a business entity to pack goods in a transport pallet.
  • The transport pallet is a hidden service category in the T&T system with:
    • assort_id = 25
    • unit_id = 17
  • This pallet is specified as a separate object in the array.
  • See Case #3: Example with a transport pallet.

2.1.27. /make_aggregation/

  • Optional parameter transport pallet was added to the items array in the request.
  • It allows a business entity to pack goods in a transport pallet.
  • The transport pallet is a hidden service category in the T&T system with:
    • assort_id = 25
    • unit_id = 17
  • This pallet is specified as a separate object in the array.
  • See Case #3: Example with a transport pallet.

Changes log from v21.5 to v22.1

New method 2.1.18. /stop_generate_codes/

  • This method is used to manually stop the code generation process.
  • This makes sense if the generation process has stopped for a long time.
  • After executing this request, /gen_batch_codes/ can be re-executed.

New method 2.1.25. /stop_gen_product_codes/

  • This method is used to manually stop the code generation process.
  • This makes sense if the generation process has stopped for a long time.
  • After executing this request, /gen_product_codes/ can be re-executed.

2.1.22. /make_aggregation/ and 2.1.29. /make_aggregation/

  • In both methods, the make_aggregation example was fixed by removing the extra parameter pack_ext_id.

2.1.23. /make_production/

  • Optional parameter order_num was added to the request.

Changes log from v22.1 to v22.2

2.1.22. /make_aggregation/ and 2.1.29. /make_aggregation/

  • In both make_aggregation methods, parameter product_line_ext_id is no longer mandatory.

Changes log from v22.2 to v23.1

In all pages

  • Page numbers were added.

In all methods

  • Description text was updated from retail to local production in the emission_type parameter.
  • New response status in progress was added with a hint where request_id is used.

2.1.36. /code_info/

  • New response parameter order_num was added - excise codes order number.

Changes log from v23.1 to v24.1

2.1.39. /not_activated_codes/

  • New method was added.

2.1.36. /code_info/

  • New fields were added to the response table.

2.1.15. /orders_list/

  • General counters for the request were removed from the response table.

Changes log from v24.1 to v24.2

Affected methods

The following methods were updated:

  • 2.1.16. /make_batch/
  • 2.1.22. /make_aggregation/
  • 2.1.23. /make_production/
  • 2.1.29. /make_aggregation/
  • 2.1.30. /make_disaggregation/
  • 2.1.31. /make_shipping/
  • 2.1.33. /make_supply/
  • 2.1.34. /make_utilization/

Added note:

If a new request with the same parameters but a different request_id is received within 5 minutes of the initial request, it will be treated as a repeat of the previous request. The handling will be identical to that of a request with the same request_id. After 5 minutes, such a request will be treated as a new request.

In all methods

  • In examples, separation between Example request >> and Example response << was added.

Changes log from v24.2 to v24.3

2.1.32. /supplies/

  • New request parameters num and status were added.
  • New response parameter status was added in the item array.

New method 2.1.33. /shippings/

  • The /shippings/ method can be used to get a list of shippings to other counterparties (companies).

New method 2.1.34. /product_moves/

  • The /product_moves/ method can be used to get a list of internal movement documents.

Changes log from v24.3 to v25.1

Method 2.1.21. /close_batch/ updated

  • New error code added: 231 - The batch is already closed.

Method 2.1.16. /make_batch/ updated

  • Removed the following note:

If a new request with the same parameters but a different request_id is received within 5 minutes of the initial request, it will be treated as a repeat of the previous request. The handling will be identical to that of a request with the same request_id. After 5 minutes, such a request will be treated as a new request.

Method 2.1.38. /code_info/ updated

  • New query string parameter show_image was added.

New method 2.1.42. /track_code/

  • Method can be used to retrieve tracking information for codes.

Method 2.1.1. /login_api/ updated

  • New request parameter fiscal_id was added.

Changes log from v25.1 to v25.2

General

  • Maximum size of unpacked request data was updated from 250 Kb to 1 Mb:
    • In all method notes: Note sections.
    • In request tables where request size limitations are described.

Method /make_disaggregation/ — Send unpacking / disaggregating results

  • New parameter depart_ext_id was added.
    • Marked as mandatory.
  • New error code added:
    • 180 - The item with the code %s is not found in the current department.

Methods /gen_batch_codes/ and /gen_product_codes/

  • Added note:

Within a single organization, only one code generation process can be active at a time. A subsequent generation can be initiated only after the current process is complete.